package com.wk1un2.service.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wk1un2.entity.Administrator;
import com.wk1un2.mapper.AdministratorMapper;
import com.wk1un2.service.AdministratorService;

/**
 * 业务接口的实现类
 * 
 * @author Administrator
 *
 */
@Service // 扫描
public class AdministratorServiceImpl implements AdministratorService {

	@Autowired
	private AdministratorMapper administratorMapper;// 自动注入mapper

	@Override
	public Administrator findAllAdmin(String admin_name, String admin_password) {
		// TODO Auto-generated method stub
		System.out.println(admin_name);
		System.out.println(admin_password);

		return administratorMapper.getAll(admin_name, admin_password);// 获取所有用户 调用mapper
	}

	@Override
	public int add(Map<String, Object> m) {
		// TODO Auto-generated method stub
		return administratorMapper.add(m);
	}

}
